package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class AdviceMethods extends BaseMethods {

    private static AdviceMethods m_ins = null;

    public static AdviceMethods getInstance() {
        if (m_ins == null) {
            synchronized (AdviceMethods.class) {
                if (m_ins == null) {
                    m_ins = new AdviceMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Personal/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void go_opinion(Subscriber<Object> subscriber,
                      int uid,
                      String hashid,String content ) {
        Observable observable = initService().go_opinion(System.currentTimeMillis()+"",
                "c8bb69fee40f114551362426f6adc0be",uid,hashid,content
        );
        toSubscribe(observable, subscriber);
    }
}
